__author__ = 'Berendeeva'

import unittest

from setting.service import Session, Login
from tests import URL, USERNAME, PASSWORD


class LoginTest(unittest.TestCase):

    def test_login_in_firefox(self):
        """
        Implements login in Firefox.
        """
        driver = Session().open_firefox()
        Login(driver=driver, url=URL).login(username=USERNAME, password=PASSWORD)
        Session().close_browser(driver)

    def test_login_in_chrome(self):
        """
        Implements login in Chrome.
        """
        driver = Session().open_chrome()
        Login(driver=driver, url=URL).login(username=USERNAME, password=PASSWORD)
        Session().close_browser(driver)

    #def test_login_in_explorer(self):
    #    """
    #    Implements login in Explorer.
    #    """
    #    driver = Session().open_explorer()
    #    Login(driver=driver, url=URL).login(username=USERNAME, password=PASSWORD)
    #    Session().close_browser(driver)

if __name__ == "__main__":
    unittest.main()